package com.tianji.learning.service;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.dto.QuestionFormDTO;
import com.tianji.learning.domain.po.InteractionQuestion;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.learning.domain.query.QuestionAdminPageQuery;
import com.tianji.learning.domain.query.QuestionPageQuery;
import com.tianji.learning.domain.vo.QuestionAdminVO;
import com.tianji.learning.domain.vo.QuestionVO;
import com.tianji.learning.excel.easyexcel.QuestionExcelModel;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 互动提问的问题表 服务类
 * </p>
 *
 * @author 东哥
 * @since 2025-10-25
 */
public interface IInteractionQuestionService extends IService<InteractionQuestion> {

    void saveQuestion(QuestionFormDTO formDTO);

    PageDTO<QuestionVO> pageQuery(QuestionPageQuery pageQuery);

    QuestionVO queryById(Long id);

    PageDTO<QuestionAdminVO> adminPageQuery(QuestionAdminPageQuery pageQuery);

    /**
     * 5、根据ID删除互动问题（Day5 - 实战）
     * @param id
     */
    void deleteById(Long id);

    /**
     * 6、根据ID修改互动问题（Day5 - 实战）
     * @param id
     * @param questionDTO
     */
    void updateQuestion(Long id, QuestionFormDTO questionDTO);

    /**
     * 7、管理端根据ID查询互动问题（Day5 - 实战）
     * @param id
     * @return
     */
    QuestionAdminVO queryQuestionByIdAdmin(Long id);

    /**
     * 8、管理端隐藏或显示问题（Day5 - 实战）
     * @param id
     * @param hidden
     */
    void hiddenQuestion(Long id, Boolean hidden);

    /**
     * 9、获取导出数据
     * @param query
     * @return
     */
    List<QuestionExcelModel> getExportDatas(QuestionPageQuery query);

    void exportStyle1(HttpServletResponse response, List<QuestionExcelModel> dataList) throws IOException;
    void exportStyle2(HttpServletResponse response, List<QuestionExcelModel> dataList) throws Exception;
    void exportStyle3(HttpServletResponse response, List<QuestionExcelModel> dataList);
    void exportStyle4(HttpServletResponse response, List<QuestionExcelModel> dataList);
    void exportStyle5(HttpServletResponse response, List<QuestionExcelModel> dataList);
}
